import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import UserRegister from '../components/UserRegister.vue'
import UserLogin from '../components/UserLogin.vue'
import Order from '../components/Order.vue'
import Address from '../components/Address.vue'
import Cate from '../components/Cate.vue'
import UserInfo from '../components/UserInfo.vue'
import Shopp from '../components/Shopp.vue'
import OrderFrom from '../components/OrderFrom.vue'
import Comment from '../components/Comment.vue'
import Merchant from '../components/merchant.vue'
import MerchantGl from '../components/merchant_gl.vue'
import MerchantOrder from '../components/merchant_order.vue'
import message from '../components/message.vue'
import index from '../components/index.vue'
import message_mert from '../components/message_mert.vue'
import Merchant_comment from '../components/merchant_comment.vue'
import merchantinfo from '../components/merchant_info.vue'


Vue.use(VueRouter)

const routes = [
  // {
  //   path: '/',
  //   name: 'Home',
  //   component: Home
  // },
  {
    path: '/user_register',
    name: 'UserRegister',
    component: UserRegister
  },
  {
    path: '/',
    name: 'UserLogin',
    component: UserLogin
  },
  {
    path: '/order',
    name: 'Order',
    component: Order
  },
  {
    path: '/address',
    name: 'Address',
    component: Address
  },
  {
    path: '/cate',
    name: 'Cate',
    component: Cate
  },
  {
    path: '/userinfo',
    name: 'UserInfo',
    component: UserInfo
  },
  {
    path: '/shopp',
    name: 'Shopp',
    component: Shopp
  },
  {
    path: '/order_from',
    name: 'OrderFrom',
    component: OrderFrom
  },
  {
    path: '/comment',
    name: 'Comment',
    component: Comment
  },
  {
    path: '/merchant_login',
    name: 'Merchant',
    component: Merchant
  },
  {
    path: '/merchant_gl',
    name: 'MerchantGl',
    component: MerchantGl
  },
  {
    path: '/merchant_order',
    name: 'MerchantOrder',
    component: MerchantOrder
  },
  {
    path: '/message',
    name: 'mssage',
    component: message
  },
  {
    path: '/index',
    name: 'index',
    component: index
  },
  {
    path: '/message_mert',
    name: 'message_mert',
    component: message_mert
  },
  {
    path: '/merchant_comment',
    name: 'Merchant_comment',
    component: Merchant_comment
  },
  {
    path: '/merchant_info',
    name: 'merchantinfo',
    component: merchantinfo
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/About.vue')
    }
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
